/*
 * Adam Blackwell ada2358@ccs.neu.edu
 */
/**
 * Artifact :
 * 
 * @author Adam
 * 
 */
public class Artifact {
  private Coord  coordinate;
  private String name;
  
  private Artifact(Coord c, String s) {
    coordinate = c;
    name = s;
  }
  
  public static Artifact create(Coord c, String s) {
    return new Artifact(c, s);
  }
  
  public Coord position() {
    return this.coordinate;
  }
  
  public String name() {
    return this.name;
  }
  
  public Artifact move(int dx, int dy) {
    return Artifact.create(this.coordinate.move(dx, dy), this.name);
  }
  
  public String toString() {
    return name + this.coordinate.toString();
  }
  
  public boolean equals(Artifact a) {
    return (this.coordinate.equals(a.position()) && this.name.equals(a.name()));
  }
  
  public boolean equals(Object obj) {
    return false;
  }
  
  public int hashCode() {
    return this.coordinate.hashCode() + this.name.hashCode();
  }
}
